#pragma once
#ifndef ResourcePage_header_included
#define ResourcePage_header_included

//#include <wx/fswatcher.h>
#include <wx/thread.h>

class ResourceTree;

class ResourcePage : public wxPanel
{
public:
	ResourcePage(wxWindow* parent);
	~ResourcePage(void);

	void RefreshParticleSystemTree();
	void RefreshMeshTree();

	void OnReloadAllButton(wxCommandEvent& e);
//	void OnFileChanged(wxFileSystemWatcherEvent& e);

	void CheckFileModification();
	void AddModifiedFile(const std::wstring& filename);

	DECLARE_EVENT_TABLE()

private:
	void WatcherThread();

private:
	ResourceTree* mTree;
	//wxFileSystemWatcher mFileSystemWatcher;
	wxThread* m_pWatcherThread;
	std::queue<std::wstring> mModifiedFiles;
	wxCriticalSection mCS;
};
#endif //ResourcePage_header_included
